//
//  NSArray+Safe.m
//  mmbang
//
//  Created by 倪元政 on 16/7/7.
//  Copyright © 2016年 iyaya. All rights reserved.
//

#import "NSArray+Safe.h"

@implementation NSArray (Safe)

#pragma mark 查询

- (id)safeObjectAtIndex:(NSUInteger)index
{
    if (![self isKindOfClass:[NSArray class]]) {
        return nil;
    }
    if (index<[self count]) {
        return [self objectAtIndex:index];
    }else{
        return nil;
    }
}

@end
